﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" ValidateRequest = "false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	CreateItemRelay
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">  
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.debug.js") %>" type="text/javascript"></script>  
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.debug.js") %>" type="text/javascript"></script>   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="../../Content/ckfinder/ckfinder.js" type="text/javascript"></script>
    <link href="../../Content/Admin/control.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/test1.js"></script>
<script src="../../Content/ckeditor/ckeditor.js" type="text/javascript"></script>
    <link href="../../Content/template.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine-vi.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            $("#chonanh").click(function () {
                var ckfinder = new CKFinder();
                ckfinder.selectActionFunction = function (fileurl) {
                    $("#anh").val(fileurl);
                };
                ckfinder.popup();
            });
        });
    </script>
   <script>
    function keys(e) { var keyword = null; if (window.event) { keyword = window.event.keyCode; }
     else { keyword = e.which; }
      if (keyword < 48 || keyword > 57) { if (keyword == 48 || keyword == 127) { return; } return false; } }
   </script>
 <script>
     jQuery(document).ready(function () {
         // binds form submission and fields to the validation engine
         jQuery("#formID").validationEngine();
     });
</script>
 <script type="text/javascript">
     var editor;
     function taoeditor(languagecode, id) {
         var editor = CKEDITOR.replace(id, { language: languagecode });
     }
     $(function () { taoeditor('vi', 'noidung') });
         </script>
           <style type="text/css">
        .khung
        { width:auto; height:auto;
          border:1px solid gray;
          line-height:30px;
        }
        .khung trên
        {
            width:800px;
            height:200px;
            }
              .khung duoi
        {
            width:800px;
            height:100px;
            margin-top:20px;
            }
               .style2
               {
                   width: 37px;
               }
    </style>
     <form method="post" action="/ItemRelay/CreateItemRelay" id="formID">
    <div class="khung">
    <table width="100%">
    <tr>
    
    <td class="style2">Tên vật phẩm:</td>
    <td><% if (ViewData["listitem"] != null)
           {%>
           <%: Html.DropDownList("listitem", "--Chọn vật phẩm--")%>
          <%} %>
    </td>
    </tr>
     <tr>
    <td class="style2">Số lượng:</td><td><input type="text" name="Quantity" id="soluong" onkeypress="return keys(event)" class="validate[required]"/></td>
    </tr>
    <tr>
    <td class="style2">Trạng thái:</td><td><input type="radio" name="IsBind" id="rdoco" value="Có" /> Có &nbsp;<input type="radio" name="IsBind" id="rdokhong" value="Không" />Không</td>
    </tr>
    <tr><td class="style2">Tặng cho:</td>
    <td>
    <% if (ViewData["listuser"] != null)
       {%>
        <%: Html.DropDownList("listuser", "--Nhập tên người được tặng--")%>
        <%} %>
    </td></tr>
     <tr><td class="style2">Tên server:</td><td ><%if (ViewData["listserver"] != null)
                                                   { %> <%: Html.DropDownList("listserver", "--Chọn server--")%><%} %></td></tr>
      <tr><td class="style2">GuiLD đạo cụ:</td><td ><%if (ViewData["listguild"] != null)
                                                   { %> <%: Html.DropDownList("listguild", "--Chọn Guild--")%><%} %></td></tr>
    <tr><td class="style2">Gửi đến:</td><td ><input type="text" name="mailTo" id="txtSentMail" /></td></tr>
    <tr><td class="style2" >Tiêu đề:</td><td ><input type="text" name="subject" class="validate[required]" /></td></tr>
    <tr><td class="style2">Nội dung</td><td ><textarea name="content" id="noidung" style="width:100%"></textarea></td></tr>
    <tr><td class="style2">Quản lý ảnh:</td><td ><input type="text" id="anh" /><input type="button" value="Chọn ảnh" id="chonanh" /></td></tr>
    </table>    
    <div class="Control" style="margin-top:10px">
      <input type="submit" id="btn_tao" value="Tặng đạo cụ" class="vadd"/>
      <%:Html.ActionLink("Quay lại", "GetItems", "Items", new { @class="vback"})%>
      </div>
      </div>
     </form>

</asp:Content>
